# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ameba
pkgver=0.14.3
pkgrel=1
pkgdesc="static code analysis tool for Crystal"
url="https://github.com/crystal-ameba/ameba"
arch="x86_64 aarch64"
license="MIT"
makedepends="crystal libxml2-dev shards yaml-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/veelenga/ameba/archive/v$pkgver.tar.gz
	0001-unexpected-token.patch
	"

export CRYSTAL_CACHE_DIR="$srcdir/.cache"

build() {
	make CRFLAGS="--release"
}

check() {
	make test SPEC_FLAGS="--no-color"
}

package() {
	make install PREFIX="$pkgdir/usr"
}

sha512sums="
830d71a74bb76c8ed0ee96f0a9363fb3ee7d8eb080a6b8fe07d5e79393e570666f49ac84296d40d77e35c26d0f3d8ad03298e90581bbefd0ac2f45ceb04b969a  ameba-0.14.3.tar.gz
748ca336efaf4b1da798ee918dbe652357e1b309a022906a68b2ad07950018f1b3105c2711b2449eae944647bd5b1e5a2038221d6d465ebfdc656c1a9308c8af  0001-unexpected-token.patch
"
